<template>
  <a-modal
    v-model:visible="props.visible"
    @ok="props.setVisible(false)"
    @cancel="props.setVisible(false)"
    :footer="false"
    :unmountOnExit="true"
  >
    <template #title>{{ props.title ?? "" }} </template>
    <div>
      <template v-if="props.visible">
        <slot name="default"></slot>
      </template>
    </div>
  </a-modal>
</template>

<script setup lang="ts">
const props = defineProps<{
  visible: boolean;
  setVisible: (visible: boolean) => void;
  title: string;
}>();
</script>
